//
//  ReversiRandomVirtualPlayer.m
//  Reversi
//
//  Created by 成瀬 龍人 on 2/8/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "ReversiRandomVirtualPlayer.h"


@implementation ReversiRandomVirtualPlayer

- (id)initWithBundle:(NSBundle*)bundle{
	[super init];
	return self;
}

- (ReversiBoardPosition*)nextHand:(ReversiStone)aStone:(ReversiBoard*)aBoard{
	NSArray* array = [aBoard allocatablePositions:aStone];
	int index = rand() % [array count];
	return [array objectAtIndex:index];
}

- (BOOL)haveConfigWindow{
	return NO;
}

- (void)openConfigWindow{
}

- (void)setUpPlayer{
}

- (NSString*)name{
	return @"Random Player";
}

- (NSString*)description{
	return @"Random";
}

@end
